from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
import pytest,os,allure

@allure.step("打开百度")
def test_baidu():
    driver=webdriver.Chrome()
    driver.get('https://www.baidu.com/')
    driver.find_element(By.LINK_TEXT,'新闻').click()
    sleep(2)
    driver.switch_to.window(driver.window_handles[-1])
    sleep(5)
    driver.quit()
